﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.Common;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;

namespace GtsServer.Manage.Controller {
    public class VersionController {
        VersionDAL dal = new VersionDAL();
        public List<VersionModel> GetList(string strWhere = "") {
            List<VersionModel> list = new List<VersionModel>();
            DataSet ds = dal.GetList(strWhere);
            list = IListDataSet.DataSetToIList<VersionModel>(ds, 0).ToList();
            return list;
         
        }
        public List<VersionModel> GetListByVesion()
        {
            List<VersionModel> list = new List<VersionModel>();
            DataSet ds = dal.GetListByVesion();
            list = IListDataSet.DataSetToIList<VersionModel>(ds, 0).ToList();
            return list;

        }
        public int Add(VersionModel models) {
            return dal.Add(models);
        }
        public bool Update(VersionModel model) {
            return dal.Update(model);
        }
        public bool Delete(int ID) {
            return dal.Delete(ID);
        }
    }
}
